package com.dobbinsoft.iotechn.device.config;

import com.dobbinsoft.iotechn.device.mqtt.handler.*;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Description: 对具体的Handler进行配置，每个具体的Handler都会在IotMqttConfig中进行自动注册
 * User: rize
 * Date: 2020/6/22
 * Time: 15:20
 */
@Configuration
public class IotMqttHandlerConfig {

    @Bean
    public IotMqttConnectMessageHandler iotMqttConnectMessageHandler() {
        return new IotMqttConnectMessageHandler();
    }

    @Bean
    public IotMqttDataMessageHandler iotMqttDataMessageHandler() {
        return new IotMqttDataMessageHandler();
    }

    @Bean
    public IotMqttDisconnectMessageHandler iotMqttDisconnectMessageHandler() {
        return new IotMqttDisconnectMessageHandler();
    }

    @Bean
    public IotMqttLogMessageHandler iotMqttLogMessageHandler() {
        return new IotMqttLogMessageHandler();
    }

    @Bean
    public IotMqttApiInvokeMessageHandler iotMqttApiInvokeMessageHandler() {
        return new IotMqttApiInvokeMessageHandler();
    }

}
